package com.example.zjx8969.myapplication.database;

import androidx.room.Entity;
import androidx.room.ForeignKey;
import androidx.room.Index;
import androidx.room.PrimaryKey;

@Entity(foreignKeys = {@ForeignKey(entity = User.class, parentColumns = "uid", childColumns = "userId", onDelete = ForeignKey.CASCADE)},
        indices = {@Index("userId")})
public class Book {
    @PrimaryKey
    public int bookId;

    public String title;

    public String userId;

//    public int crashVersion;

    @Override
    public String toString() {
        return "Book{" +
                "bookId=" + bookId +
                ", title='" + title + '\'' +
                ", userId='" + userId + '\'' +
//                ", crashVersion=" + crashVersion +
                '}';
    }
}
